package com.ruoyi.system.controller;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.domain.DataApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.system.service.IDataApplicationService;

@RestController
@RequestMapping("/applyForUse")
public class ApplyForUseController {

    @Autowired
    private IDataApplicationService iDataApplicationService;
    @PostMapping("/applicationUse")
    public AjaxResult applicationUse(@RequestBody DataApplication dataApplication)
    {
        if(dataApplication==null||dataApplication.getName()==null||dataApplication.getPhone()==null)
        {
            return AjaxResult.error("输入参数错误");
        }
        iDataApplicationService.insertDataApplication(dataApplication);
        return AjaxResult.success();
    }
}
